CREATE TABLE Smart_maestros
(
	sm_scmaestro INTEGER NOT NULL AUTO_INCREMENT,
	sm_comaestro VARCHAR(20) NOT NULL,
	sm_dsmaestro VARCHAR(150) NOT NULL,
	sm_scprincmaestro INTEGER NOT NULL,
	sm_fhingreso DATE NOT NULL,
	sm_fhmodificacion DATE NOT NULL,
	sm_fhretiro DATE,
	sm_cousuario VARCHAR(150) NOT NULL,
	PRIMARY KEY (sm_scmaestro),
	KEY (sm_scprincmaestro)
) 
;


ALTER TABLE Smart_maestros ADD CONSTRAINT FK_Smart_maestros_Smart_principal_maestro 
	FOREIGN KEY (sm_scprincmaestro) REFERENCES Smart_principal_maestro (sm_scprincmaestro)
;

